package tech.aistar.service;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import tech.aistar.entity.Sinchoice;
import tech.aistar.service.impl.SinchoiceServiceImpl;

import java.util.List;

@RunWith(SpringJUnit4ClassRunner.class)

@ContextConfiguration(locations = "classpath:spring/spring-*.xml")
public class testSinchoiceService {

    @Autowired
    private SinchoiceServiceImpl sinchoiceService;


    @Test
    public void testfindAll(){
        List<Sinchoice> sinchoiceList = sinchoiceService.findAll();
        System.out.println(sinchoiceList);
    }

    @Test
    public void testfindById(){
        Sinchoice sinchoiceList = sinchoiceService.findById(1L);
        System.out.println(sinchoiceList);
    }

    @Test
    public void testfindByPaperId(){
        List<Sinchoice> sinchoiceList = sinchoiceService.findByPaperId(1L);
        System.out.println(sinchoiceList);
    }

    @Test
    public void testfindAnswerByPaperId(){
        String answerByid = sinchoiceService.findAnswerByid(1L);
        System.out.println(answerByid);
    }




}
